<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Payment_Controller
 *
 * @author Samuel  | dragon.hu 2015.6.11 modify 要用新游戏的渠道
 */
defined('BASEPATH') or die('forbidden');

class Payment_Controller extends Controller {

    //put your code here
    function _init() {
//        header("Content-Type: application/json; charset=utf-8");
//        $result = $this->input->deep_stripslashes($_POST);
//        if ($result['sig'] == get_sig($result)) {
//            $this->data = isset($result['data']) ? get_json_array($result['data']) : array();
//            $method = str_replace("/", "_", $result['url']);
//            if (method_exists($this, "_" . $method)) {
//                $this->{"_{$method}"}();
//            }
//        } else {
//            json_output(0, '签名错误');
//        }
    }

 function testpayment($platform) {
        //echo $platform;
        $className = 'Testpayment';
        include APPPATH . 'channels/Testpayment.php';
        //$this->log($className,$_REQUEST);
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }
    
    function Aiwangyou($platform) {
        //echo $platform;
        $className = 'Aiwangyou';
        include APPPATH . 'channels/Aiwangyou.php';
        //$this->log($className,$_REQUEST);
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //快用    modify by dragon.hu @2016.2.19
    function Kuaiyong($platform) {
        $className = 'Kuaiyong';
        include_once APPPATH . 'channels/Kuaiyong.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //91 
    function NightOne($platform) {
        $className = 'NightOne';
        include_once APPPATH . 'channels/NightOne.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    /**
     * dragon.hu 2015.6.11 添加    Uc.SDK充值结果通知接口
     *
     */
    function Uc($platform) {
        $className = 'Uc';
        include_once APPPATH . 'channels/Uc.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }
    
    /**
     * dragon.hu 2015.8.7 添加    Ewan超级SDK充值结果通知接口
     * 
     */
	function Ewan($platfom)
	{
		$className = 'Ewan';
		include_once APPPATH . 'channels/Ewan.php';
		if (class_exists($className)){
			$pay = new $className();
			if (method_exists($pay, $platfom)){
				$pay->{$platfom}($_REQUEST);
			}
		}
	}	
    
	/**
	 * add by dragon.hu@2015.11.30 百度SDK充值结果通知接口
	 * 
	 */
	function Baidu($platform)
	{
		$className = 'Baidu';
		include_once APPPATH . 'channels/Baidu.php';
		if (class_exists($className)){
			$pay = new $className();
			if (method_exists($pay, $platform)){
				$pay->{$platform}($_REQUEST);
			}
		}
	}
    
    //同步tongbutui
    function Tongbutui($platform) {
        $className = 'Tongbutui';
        include_once APPPATH . 'channels/Tongbutui.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //当乐dangle  modify by dragon.hu @2016.2.26
    function Dangle($platform) {
        $className = 'Dangle';
        include_once APPPATH . 'channels/Dangle.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //itools  modify by dragon.hu @2016.2.18
    function Itools($platform) {
        $className = 'Itools';
        include_once APPPATH . 'channels/Itools.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //pp  modify by dragon.hu @2016.2.18
    function Pp($platform) {
        $className = 'Pp';
        include_once APPPATH . 'channels/Pp.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //联赢汇
    function Lianyinghui($platform) {
        $className = 'Lianyinghui';
        include_once APPPATH . 'channels/Lianyinghui.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //pps  modify by dragon.hu @2016.3.16
    function Pps($platform) {
        $className = 'Pps';
        include_once APPPATH . 'channels/Pps.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //拇指玩        modify by dragon.hu@2016.2.3  new
    function Muzhiwan($platform) {
        $className = 'Muzhiwan';
        include_once APPPATH . 'channels/Muzhiwan.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //oppo  modify by dragon.hu@2015.11.27  new
    function Oppo($platform) {
        $className = 'Oppo';
        include_once APPPATH . 'channels/Oppo.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //小米      modify by dragon.hu@2015.11.27  new
    /*支付回调测试用例http://192.168.18.20/master/mcGM/payment/Xiaomi/android?appId=2882303761517239138&cpOrderId=9786bffc-996d-4553-aa33-f7e92c0b29d5&
orderConsumeType=10&orderId=21140990160359583390&orderStatus=TRADE_SUCCESS&payFee=1&payTime=2014-09-05%2015:20:27&
productCode=com.demo_1&productCount=1&productName=%E9%93%B6%E5%AD%901%E4%B8%A4&uid=100010&signature=1388720d978021c20aa885d9b3e1b70cec751496
     */
    function Xiaomi($platform) {
        $className = 'Xiaomi';
        include_once APPPATH . 'channels/Xiaomi.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //360  add by dragon.hu@2015.12.2  new
    /*支付回调自测用例
     * http://192.168.18.20/master/mcGM/payment/Sanliuling/android?order_id=1512026751221361351&app_key=a46dfaa833cbd3af0e6647172a5a56d6&product_id=6&
amount=100&app_uid=6674&user_id=2588569482&sign_type=md5&app_order_id=2bf5f0bede9a45058709f548cdc77594&gateway_flag=success&sign=9dc60d0c0e163999e7aba459f99997c5&sign_return=1ea26f29d44a680648c26bab60dc40a0
     * */
    function Sanliuling($platform) {
    	$className = 'Sanliuling';
    	include_once APPPATH . 'channels/Sanliuling.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if (method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    
    //多酷
    function Duoku($platform) {
        $className = 'Duoku';
        include_once APPPATH . 'channels/Duoku.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //爱思    modify by dragon.hu @2016.2.19
    function Aisi($platform) {
        $className = 'Aisi';
        include_once APPPATH . 'channels/Aisi.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //联想    modify by dragon.hu @2015.12.3  new
    
    function Lianxiang($platform) {
        $className = 'Lianxiang';
        include_once APPPATH . 'channels/Lianxiang.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //Wandoujia    modify by dragon.hu @2016.2.18
    function Wandoujia($platform) {
        $className = 'Wandoujia';
        include_once APPPATH . 'channels/Wandoujia.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //海马        modify by dragon.hu @2016.2.19
    function Haima($platform) {
        $className = 'Haima';
        include_once APPPATH . 'channels/Haima.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //xy苹果助手    modify by dragon.hu @2016.2.18
    function Xy($platform) {
        $className = 'Xy';
        include_once APPPATH . 'channels/xy.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //金立;  modify by dragon.hu @2016.2.3  new
    function JinLi($platform) {
        $className = 'JinLi';
        include_once APPPATH . 'channels/JinLi.php';
        if (class_exists($className)) {
            $pay = new $className();
            if (method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

    //安智;  modify by dragon.hu @2016.3.8
    function Anzhi($platform) {
        $className = "Anzhi";
        include_once APPPATH . 'channels/Anzhi.php';
        if (class_exists($className)) {
            $pay = new $className();
            if(method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }

	//华为  modify by dragon.hu @2015.12.4 new
    function Huawei($platform) {
        $className = 'Huawei';
        include_once APPPATH . 'channels/huawei.php';
        if (class_exists($className)) {
            $pay = new $className();
            if(method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }
    
//vivo支付    modify by dragon.hu @2016.2.18
    function Vivo($platform) {
        $className = 'Vivo';
        include_once APPPATH . 'channels/Vivo.php';
        if (class_exists($className)) {
            $pay = new $className();
            if(method_exists($pay, $platform)) {
                $pay->{$platform}($_REQUEST);
            }
        }
    }
    
    //暴风    modify by dragon.hu @2016.2.24
    function Baofeng($platform) {
    	$className = 'Baofeng';
    	include_once APPPATH . 'channels/Baofeng.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //新暴风(测试)
    function Newbaofeng($platform) {
    	$className = 'newBaofeng';
    	include_once APPPATH . 'channels/newBaofeng.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //shouhuzhemen测试用
  //  function shzmTest($platform) {
   // 	$className = 'shzmTest';
   // 	include_once APPPATH . 'channels/shzmTest.php';
   // 	if (class_exists($className)) {
   // 		$pay = new $className();
   // 		if(method_exists($pay, $platform)) {
    //			$pay->{$platform}($_REQUEST);
    //		}
    //	}
   // }
    //机锋  dragon.hu add@2016.2.1
    function Gfan($platform) {
    	$className = 'Gfan';
    	include_once APPPATH . 'channels/Gfan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //4399  dragon.hu add@2016.2.2
    function M4399($platform) {
    	$className = 'M4399';
    	include_once APPPATH . 'channels/M4399.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //xx助手  dragon.hu add@2016.2.17
    function Guopan($platform) {
    	$className = 'Guopan';
    	include_once APPPATH . 'channels/Guopan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //魅族  dragon.hu add@2016.2.17
    function Meizu($platform) {
    	$className = 'Meizu';
    	include_once APPPATH . 'channels/Meizu.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //靠谱  dragon.hu add@2016.2.18
    function Kaopu($platform) {
    	$className = 'Kaopu';
    	include_once APPPATH . 'channels/Kaopu.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //卓易  dragon.hu add@2016.2.19
    function Zhuoyi($platform) {
    	$className = 'Zhuoyi';
    	include_once APPPATH . 'channels/Zhuoyi.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //麟游  dragon.hu add@2016.2.19
    function Linyou($platform) {
    	$className = 'Linyou';
    	include_once APPPATH . 'channels/Linyou.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //乐8  dragon.hu add@2016.2.19
    function Le8($platform) {
    	$className = 'Le8';
    	include_once APPPATH . 'channels/Le8.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //虫虫  dragon.hu add@2016.2.19
    function Chongchong($platform) {
    	$className = 'Chongchong';
    	include_once APPPATH . 'channels/Chongchong.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //应用汇  dragon.hu add@2016.2.22
    function Yingyonghui($platform) {
    	$className = 'Yingyonghui';
    	include_once APPPATH . 'channels/Yingyonghui.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //PPTV dragon.hu add@2016.2.22
    function Pptv($platform) {
    	$className = 'Pptv';
    	include_once APPPATH . 'channels/Pptv.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //酷派 dragon.hu add@2016.2.23
    function Kupai($platform) {
    	$className = 'Kupai';
    	include_once APPPATH . 'channels/Kupai.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //8868 dragon.hu add@2016.2.23
    function M8868($platform) {
    	$className = 'M8868';
    	include_once APPPATH . 'channels/M8868.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //TT语音(手游吧) dragon.hu add@2016.2.23
    function Shouyouba($platform) {
    	$className = 'Shouyouba';
    	include_once APPPATH . 'channels/Shouyouba.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //HTC dragon.hu add@2016.2.24
    function Htc($platform) {
    	$className = 'Htc';
    	include_once APPPATH . 'channels/Htc.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //广狐安卓 dragon.hu add@2016.2.24
    function Guanghu($platform) {
    	$className = 'Guanghu';
    	include_once APPPATH . 'channels/Guanghu.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //全民助手 dragon.hu add@2016.2.24
    function Qmzs($platform) {
    	$className = 'Qmzs';
    	include_once APPPATH . 'channels/Qmzs.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //搜狗 dragon.hu add@2016.2.24
    function Sougou($platform) {
    	$className = 'Sougou';
    	include_once APPPATH . 'channels/Sougou.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    
    //九城 dragon.hu add@2016.2.26
    function Jiucheng($platform) {
    	$className = 'Jiucheng';
    	include_once APPPATH . 'channels/Jiucheng.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //泡椒 dragon.hu add@2016.2.26
    function Paojiao($platform) {
    	$className = 'Paojiao';
    	include_once APPPATH . 'channels/Paojiao.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //酷狗 dragon.hu add@2016.2.26
    function Kugou($platform) {
    	$className = 'Kugou';
    	include_once APPPATH . 'channels/Kugou.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }

    //飞流 dragon.hu add@2016.3.1
    function Feiliu($platform) {
    	$className = 'Feiliu';
    	include_once APPPATH . 'channels/Feiliu.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    
    //乐视 dragon.hu add@2016.3.9
    function Leshi($platform) {
    	$className = 'Leshi';
    	include_once APPPATH . 'channels/Leshi.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //应用宝 dragon.hu add@2016.3.9  类似苹果的流程(沙盒验证)
    function Yingyongbao($platform) {
    	$className = 'Yingyongbao';
    	include_once APPPATH . 'channels/Yingyongbao.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
	//啪啪  dragon.hu add@2016.3.10
    function Papa($platform) {
    	$className = 'Papa';
    	include_once APPPATH . 'channels/Papa.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //猎宝网 dragon.hu add@2016.3.10
    function Liebao($platform) {
    	$className = 'Liebao';
    	include_once APPPATH . 'channels/Liebao.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //优酷 dragon.hu  add@2016.3.10
    function Youku($platform) {
    	$className = 'Youku';
    	include_once APPPATH . 'channels/Youku.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    
    //魔游游 dragon.hu  add@2016.3.16
    function Moyoyo($platform) {
    	$className = 'Moyoyo';
    	include_once APPPATH . 'channels/Moyoyo.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //电魂 dragon.hu  add@2016.3.16
    function Dianhun($platform) {
    	$className = 'Dianhun';
    	include_once APPPATH . 'channels/Dianhun.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }

    //偶玩 dragon.hu  add@2016.3.16
    function Ouwan($platform) {
    	$className = 'Ouwan';
    	include_once APPPATH . 'channels/Ouwan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //朋友玩 dragon.hu  add@2016.3.16
    function Pengyouwan($platform) {
    	$className = 'Pengyouwan';
    	include_once APPPATH . 'channels/Pengyouwan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //顺玩 dragon.hu  add@2016.5.13
    function shunwan($platform) {
    	$className = 'shunwan';
    	include_once APPPATH . 'channels/shunwan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //勇士互娱 dragon.hu  add@2016.6.28
    function yshy($platform) {
    	$className = 'yshy';
    	include_once APPPATH . 'channels/yshy.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    
    //台湾SDK dragon.hu  add@2016.4.1
    function Taiwan($platform) {
    	$className = 'Taiwan';
    	include_once APPPATH . 'channels/Taiwan.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //新马SDK dragon.hu  add@2016.4.5
    function Vstar($platform) {
    	$className = 'Vstar';
    	include_once APPPATH . 'channels/Vstar.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //koreaSDK dragon.hu  add@2016.4.9
    function Koreasdk($platform) {
    	$className = 'Koreasdk';
    	include_once APPPATH . 'channels/Koreasdk.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //SouthAfrica dragon.hu  add@2016.5.6
    function SouthAfrica($platform) {
    	$className = 'SouthAfrica';
    	include_once APPPATH . 'channels/SouthAfrica.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
    //Thailand dragon.hu  add@2016.6.2
    function ThaiVstar($platform) {
    	$className = 'ThaiVstar';
    	include_once APPPATH . 'channels/ThaiVstar.php';
    	if (class_exists($className)) {
    		$pay = new $className();
    		if(method_exists($pay, $platform)) {
    			$pay->{$platform}($_REQUEST);
    		}
    	}
    }
}

?>
